﻿using JuCheap.Core.Infrastructure.Extentions;
using System;

namespace JuCheap.Core.Model.Message
{
    /// <summary>
    /// 我的站内信模型
    /// </summary>
    public class MyMessageResponseDto
    {
        /// <summary>
        /// Id
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        public string Contents { get; set; }

        /// <summary>
        /// 发送人
        /// </summary>
        public string Sender { get; set; }

        /// <summary>
        /// 发送时间
        /// </summary>
        public DateTime SendTime { get; set; }

        /// <summary>
        /// 友好显示时间
        /// </summary>
        public string SendTimeFriend
        {
            get
            {
                return SendTime.ToFriendString();
            }
            set
            {
                SendTimeFriend = value;
            }
        }

        /// <summary>
        /// 状态
        /// </summary>
        public byte Status { get; set; }

        /// <summary>
        /// 状态名称
        /// </summary>
        public string StatusName => ((MessageStatus)Status).GetDescriptionForEnum();

        /// <summary>
        /// 发送类型
        /// </summary>
        public byte SendType { get; set; }

        /// <summary>
        /// 类型名称
        /// </summary>
        public string SendTypeName => ((MessageType)SendType).GetDescriptionForEnum();

        /// <summary>
        /// 查看时间
        /// </summary>
        public DateTime? ReadDate { get; set; }
    }
}
